<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="description" content="">
		<meta name="author" content="">
		<title>新建商品</title>
		<link rel="stylesheet" href="../../css/base.css" />
		<link rel="stylesheet" href="../../css/common.css" />
		<link href="../../sbadmin/bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="../../js/weditor/aliyun-oss-sdk.js"></script>
		<script type="text/javascript" src="../../js/weditor/wangEditor.js"></script>
		<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
		<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
		<!--[if lt IE 9]>
	<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
	<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
	<![endif]-->
		<style>
			body {
				padding: 0 15px !important;
			}
		</style>
	</head>

	<body style="background:#FFF;">
		<div class="comm-tt-font pr">
			出售商品 > 新建商品
		</div>
		<div class="shop-detail-box pr">
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl"><em>*</em>封面图：</div>
				<div class="ad-form-itemcc fl">
					<img src="../../img/test2.jpg" class="adf-img">
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl"><em>*</em>商品图片：</div>
				<div class="wod-form-itemcc fl">
					<div class="sale-detailimg2">
						<img src="../../img/test2.jpg">
					</div>
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl"><em>*</em>商品编号：</div>
				<div class="wod-form-itemcc fl">
					<input type="text" class="edit-input" />
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl"><em>*</em>商品名：</div>
				<div class="wod-form-itemcc fl">
					<input type="text" class="edit-input" />
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl"><em>*</em>售价：</div>
				<div class="wod-form-itemcc fl">
					<input type="text" class="edit-input" />
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl"><em>*</em>指导价：</div>
				<div class="wod-form-itemcc fl">
					<input type="text" class="edit-input" />
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl"><em>*</em>拍摄次数：</div>
				<div class="wod-form-itemcc fl">
					<input type="text" class="edit-input" />
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl">拍摄张数：</div>
				<div class="wod-form-itemcc fl">
					<input type="text" class="edit-input" />
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl">精修张数：</div>
				<div class="wod-form-itemcc fl">
					<input type="text" class="edit-input" />
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl">服装数量：</div>
				<div class="wod-form-itemcc fl">
					<input type="text" class="edit-input" />
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl">场景数量：</div>
				<div class="wod-form-itemcc fl">
					<input type="text" class="edit-input" />
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl">相册：</div>
				<div class="wod-form-itemcc fl">
					<input type="text" class="edit-input" />
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl">摄影师：</div>
				<div class="wod-form-itemcc fl">
					<select class="eic-select" style="width: 200px;"></select>
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl">有效期：</div>
				<div class="wod-form-itemcc fl">
					<input type="text" class="edit-input" />
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl">出售门店：</div>
				<div class="wod-form-itemcc fl">
					<select class="eic-select" style="width: 200px;"></select>
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl">可使用门店：</div>
				<div class="wod-form-itemcc fl">
					<select class="eic-select" style="width: 200px;"></select>
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl">是否上架：</div>
				<div class="wod-form-itemcc fl">
					<select class="eic-select" style="width: 200px;"></select>
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl">特别说明：</div>
				<div class="wod-form-itemcc fl">
					<textarea class="ed-textarea"></textarea>
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl" id="spsss">商品详情：</div>
				<div class="wod-form-itemcc2 fl" style="width: 1000px;">
					<div id="editor"></div>
					<textarea id="etextarea" name="details" style="display: none;"></textarea>
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl">备注：</div>
				<div class="wod-form-itemcc fl">
					<textarea class="ed-textarea"></textarea>
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl">温馨提示：</div>
				<div class="wod-form-itemcc fl">
					<textarea class="ed-textarea"></textarea>
				</div>
			</div>
			<div class="wo-form-item clb mt20">
				<div class="ad-form-itemtt fl"></div>
				<div class="wod-form-itemcc fl">
					<div class="clb mt20">
						<a href="#" class="fl commqx-btn">取消</a>
						<a href="javascript:void(0);" class="fl commqr-btn ml15" id="qrbtn">确定</a>
					</div>
				</div>
			</div>

		</div>

		<!-- jQuery -->
		<script src="../../sbadmin/bower_components/jquery/dist/jquery.min.js"></script>
		<!-- Bootstrap Core JavaScript -->
		<script src="../../sbadmin/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
		<!-- Metis Menu Plugin JavaScript -->
		<script src="../../sbadmin/bower_components/metisMenu/dist/metisMenu.min.js"></script>
		<!-- DataTables JavaScript -->
		<script src="../../sbadmin/bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
		<script src="../../sbadmin/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js"></script>
		<!-- Custom Theme JavaScript -->
		<script src="../../sbadmin/dist/js/sb-admin-2.js"></script>
		<!-- Page-Level Demo Scripts - Tables - Use for reference -->
	</body>
	<script type="text/javascript">
		/*$.ajax({
							url: "https://order.wz1996.wang/wzbg/media/sts",
							type: 'get',
							success: function(data) {
								console.log(data)
								var client = new OSS({
									region: 'wangzheng1996.oss-cn-shanghai.aliyuncs.com',
									//云账号AccessKey有所有API访问权限，建议遵循阿里云安全最佳实践，创建并使用STS方式来进行API访问
									accessKeyId:data.data.credentials.accessKeyId,
									accessKeySecret: data.data.credentials.accessKeySecret,
									stsToken: data.data.credentials.securityToken,
									bucket: ''
								});
								console.log("1111111111")
								console.log(client);
							}
						});*/

		/*var E = window.wangEditor
		var editor = new E('#editor')
		var editor = new E(document.getElementById('editor'))
		editor.customConfig.uploadImgShowBase64 = true // 使用 base64 保存图片*/
		//editor.customConfig.uploadFileName
		//editor.customConfig.uploadImgServer = 'wangzheng1996.oss-cn-shanghai.aliyuncs.com'; // 上传图片到服务器
		/*editor.customConfig.uploadImgHooks = {
			customInsert: function(insertImg, result, editor) {
				var url = result.data;
				insertImg(url);
			}
		}
		var etextarea = $("#etextarea");*/

		var E = window.wangEditor;
		var editor = new E('#editor');
		//    editor.customConfig.uploadImgShowBase64 = true;   // 使用 base64 保存图片
		editor.customConfig.uploadImgServer = '/wangEditor/saveImg'; //上传图片到服务器
		editor.customConfig.uploadFileName = 'myFileName';
		editor.customConfig.uploadImgMaxSize = 20 * 1024 * 1024; //设置图片大小为20M
		editor.customConfig.uploadImgTimeout = 1000000; //图片上传超时限制10s
		editor.customConfig.menus = [
			'head', // 标题
			'bold', // 粗体
			'italic', // 斜体
			'underline', // 下划线
			'strikeThrough', // 删除线
			'foreColor', // 文字颜色
			'backColor', // 背景颜色
			'list', // 列表
			'justify', // 对齐方式
			'image', // 插入图片
			'code', // 插入代码
			'undo', // 撤销
			'redo' // 重复
		];
		editor.customConfig.uploadImgServer = 'wangzheng1996.oss-cn-shanghai.aliyuncs.com'; //上传图片到服务器
		editor.customConfig.uploadFileName = 'myFileName';
		editor.create();

		$("#qrbtn").click(function() {
			// 读取 html
			alert(editor.txt.html())
		})
	</script>

</html>